package com.csthink.web.infrastructure.security.authentication.parser;

import com.csthink.web.infrastructure.security.authentication.exception.AuthenticationParseException;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author <a href="mailto:security.2009@live.cn">Mars</a>
 * @since 2023-09-12
 */
public interface AuthenticationParser {
    Authentication parseAuthentication(HttpServletRequest request) throws AuthenticationParseException;

    List<AntPathRequestMatcher> getTargetUrlMatchers();

    boolean match(HttpServletRequest request);
}
